import request from '../../utils/request';


export function getDevelopmentCarDistributionApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/getDevelopmentCarDistribution',
        method: 'post',
        data
    });
};

export function getCarTypeDistributionApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/getCarTypeDistribution',
        method: 'post',
        data
    });
};


export function getFirstDeptCarDistributionApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/getFirstDeptCarDistribution',
        method: 'post',
        data
    });
};




export function getSecondDeptCarDistributionApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/getSecondDeptCarDistribution',
        method: 'post',
        data
    });
};




export function getProductStageCarDistributionApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/getProductStageCarDistribution',
        method: 'post',
        data
    });
};


export function getStockOutCarDistributionApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/getStockOutCarDistribution',
        method: 'post',
        data
    });
};

export function getCarDetailApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/getCarDetailByPage ',
        method: 'post',
        data
    });
};


export function importCarDetailFileApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/file/importCarDetailFile',
        method: 'post',
        data
    });
};

export function getCarLogRecordApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/getCarLogRecordByPage',
        method: 'post',
        data
    });
};
export function getTemporaryInsuranceRecordApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/getTemporaryInsuranceRecordById',
        method: 'post',
        data
    });
};


export function deleteCarDetailApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/deleteCarDetailById',
        method: 'post',
        data
    });
};




export function editCarDetailApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/editCarDetail',
        method: 'post',
        data
    });
};

export function addCarDetailApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/addCarDetail',
        method: 'post',
        data
    });
};


export function addCarBorrowDetailApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/createCarBorrowDetail',
        method: 'post',
        data
    });
};
export function editCarBorrowDetailApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/editCarBorrowDetail',
        method: 'post',
        data
    });
};



export function getCarBorrowDetailApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/getCarBorrowDetailByPage',
        method: 'post',
        data
    });
};


export function deleteCarBorrowDetailApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/deleteCarBorrowDetail',
        method: 'post',
        data
    });
};



export function getCarDistributionApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/getCarDistribution',
        method: 'post',
        data
    });
};


// export function getAllDepartmentApi (params) {
//     return request({

//         url: '/web/department',
//         method: '',
//         params:{
//             ...params
//         },
//         requestBaseUrl:'outside'
//     });
// };

export function getAllDepartmentApi (params) {
    return request({
        apiType:'CAR',
        baseURL: 'carmanage',
        url: '/web/user/getSsoDepartment',
        method: '',
        params:{
            ...params
        },
    });
};





export function getCarBorrowRecordLatestByCarIdApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/getCarBorrowRecordLatestByCarId',
        method: 'post',
        data
    });
};

export function createCarBorrowDetailApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/createCarBorrowDetail',
        method: 'post',
        data
    });
};

export function returnCarBorrowDetailApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/returnCarBorrowDetail',
        method: 'post',
        data
    });
};
export function getCheckProjectListApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/getCheckProjectList',
        method: 'post',
        data
    });
};

export function getCarBorrowReturnCheckRecordApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/getCarBorrowReturnCheckRecord',
        method: 'post',
        data
    });
};
export function checkBorrowReturnCheckRecordApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/carDetail/checkBorrowReturnCheckRecord',
        method: 'post',
        data
    });
};


export function uploadFileApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/file/uploadFile',
        method: 'post',
        data
    });
};
export function taskCarBorrowDetailApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/task/taskCarBorrowDetail',
        method: 'post',
        data
    });
};


export function getSsoUserByAccountApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/user/getSsoUserByAccount',
        method: 'post',
        data
    });
};


export function getCarDataAnalysis (params) {
    return request({
        url: '/web/car/carDataAnalysis',
        method: '',
        params:{
            ...params
        },
        requestBaseUrl:'outside39'
    });
};

export function getCarDataAnalysisExcel (params) {
    return request({
        url: '/web/car/carDataAnalysisExcel',
        method: 'get',
        params:{
            ...params
        },
        requestBaseUrl:'outside39',
        responseType: "blob",
        headers:{
            'Content-Type': 'multipart/form-data;charset=UTF-8'
        },
    });
};



//省市县查询  地区级别 regionLevel
export function getRegionApi(data) {
    return request({
        apiType:'CAR',
        url: '/web/region/getRegion ',
        method: 'post',
        data
    });
};

// 临牌保险车辆查询
export function searchTemporaryLicenseCarPage (data) {
    return request({
        apiType:'CAR',
        url: '/web/temporaryLicense/searchTemporaryLicenseCarPage ',
        method: 'post',
        data
    });
};
// 临牌保险查询借用单
export function searchBorrowDetailApi (data) {
    return request({
        apiType:'CAR',
        url: '/web/temporaryLicense/searchBorrowDetail ',
        method: 'post',
        data
    });
};

// 临牌保险任务单编辑查询
export function temporaryLicenseEditSearch (data) {
    return request({
        apiType:'CAR',
        url: '/web/temporaryLicense/editSearch ',
        method: 'post',
        data
    });
};

// 车辆临牌保险 记录查询
export function searchTemporaryLicensePage (data) {
    return request({
        apiType:'CAR',
        url: '/web/temporaryLicense/searchTemporaryLicensePage ',
        method: 'post',
        data
    });
};

// 临牌保险 新增 编辑 提交保存
export function temporaryLicenseSave (data) {
    return request({
        apiType:'CAR',
        url: '/web/temporaryLicense/save ',
        method: 'post',
        data
    });
};
//删除
export function temporaryLicenseDeleteApi(data) {
    return request({
        apiType:'CAR',
        url: '/web/temporaryLicense/delete ',
        method: 'post',
        data
    });
};

// 临牌保险 任务明细查询
export function searchTaskDetail (data) {
    return request({
        apiType:'CAR',
        url: '/web/temporaryLicense/searchTaskDetail ',
        method: 'post',
        data
    });
};

// 临牌保险 审批
export function auditConfirm (data) {
    return request({
        apiType:'CAR',
        url: '/web/temporaryLicense/auditConfirm ',
        method: 'post',
        data
    });
};
//临牌保险 审批进度查询
export function taskAuditFlow (data) {
    return request({
        apiType:'CAR',
        url: '/web/temporaryLicense/taskAuditFlow ',
        method: 'post',
        data
    });
};


// 临牌保险 结果上传确认
export function uploadResult (data) {
    return request({
        apiType:'CAR',
        url: '/web/temporaryLicense/uploadResult ',
        method: 'post',
        data
    });
};

// 临牌保险 归档
export function archiveTask (data) {
    return request({
        apiType:'CAR',
        url: '/web/temporaryLicense/archiveTask ',
        method: 'post',
        data
    });
};
//虚拟VIN查询
export function getVirtualVin (data) {
    return request({
        apiType:'CAR',
        url: '/web/thirdPartyApi/getVirtualVin ',
        method: 'post',
        data
    });
};

export function searchCarVehicle (data) {
    return request({
        apiType:'CAR',
        url: '/web/veADVC/searchCarVehicle ',
        method: 'post',
        data
    });
};
